home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 15 / booklt01.zip / SPEED.TBK (.txt) < prev    next >
Asymetrix ToolBook File  |  1990-10-10  |  147KB  |  2,082 lines

  1. afterflip
  2.      H    p    
  3. recordfield id 214 ,recordfield id 215 ,recordfield id 216 ,recordfield id 217 ,recordfield id 218 ,recordfield id 219 ,recordfield id 220 ,recordfield id 221 ,recordfield id 222 ,recordfield id 223 ,recordfield id 224 ,recordfield id 225 ,recordfield id 226 ,recordfield id 227 ,recordfield id 228 ,recordfield id 229 ,recordfield id 230 ,recordfield id 231 ,recordfield id 232 ,recordfield id 233 ,recordfield id 234 ,recordfield id 235 ,recordfield id 236 ,recordfield id 237 ,recordfield id 238 ,recordfield id 239 ,recordfield id 240 ,recordfield id 241 ,recordfield id 242 ,recordfield id 243
  4. 4ox, oy, moved, prevpos
  5. 4ox, oy
  6. H0, ty - oy
  7. getcurrenttime()
  8. H200,0
  9. "This took" && getTime(
  10. ) && "
  11. buttonstilldown
  12. buttondown
  13. buttonup
  14. buttondoubleclick
  15. buttondown
  16. moved
  17. prevpos
  18. buttonstilldown
  19. buttonup
  20. buttonstilldown
  21. buttondoubleclick
  22. getcurrenttime
  23. This took
  24. getTime
  25. seconds to move.
  26. moved
  27. prevpos
  28. Does It Matter Where Objects Are?The Background
  29. Drag the arrow to a row of objects, then double click it.
  30. buttonup
  31. buttonup
  32. response
  33. Aw geeOkaylreadyr me?ha ha ha
  34. This tests redrawing of objects on the background and page.  
  35. The bottom two rows are draw objects on the page and background.
  36. 4ox, oy, moved, prevpos
  37. 4ox, oy
  38. H0, ty - oy
  39. getcurrenttime()
  40. H200,0
  41. "This took" && getTime(
  42. ) && "
  43. buttonstilldown
  44. buttondown
  45. buttonup
  46. buttondoubleclick
  47. buttondown
  48. moved
  49. prevpos
  50. buttonstilldown
  51. buttonup
  52. buttonstilldown
  53. buttondoubleclick
  54. getcurrenttime
  55. This took
  56. getTime
  57. seconds to move.
  58. moved
  59. prevpos
  60. There
  61. 4ox, oy, moved, prevpos
  62. 4ox, oy
  63. H0, ty - oy
  64. getcurrenttime()
  65. H200,0
  66. "This took" && getTime(
  67. ) && "
  68. buttonstilldown
  69. buttondown
  70. buttonup
  71. buttondoubleclick
  72. buttondown
  73. moved
  74. prevpos
  75. buttonstilldown
  76. buttonup
  77. buttonstilldown
  78. buttondoubleclick
  79. getcurrenttime
  80. This took
  81. getTime
  82. seconds to move.
  83. moved
  84. prevpos
  85. flipper
  86. afterflip
  87. enterpage
  88. enterpage
  89. "Now 
  90. good men 
  91. come 
  92. their country."
  93. getcurrenttime()
  94. "It took" && getTime(
  95. ) && "
  96. buttonup
  97. buttonup
  98. Now is the time for all good men to come to the aid of their country.
  99. getcurrenttime
  100. It took
  101. getTime
  102. seconds to do this.
  103. An Opaque Overlapping Field
  104. "Now 
  105. good men 
  106. come 
  107. their country."
  108. getcurrenttime()
  109. "It took" && getTime(
  110. ) && "
  111. buttonup
  112. buttonup
  113. Now is the time for all good men to come to the aid of their country.
  114. getcurrenttime
  115. It took
  116. getTime
  117. seconds to do this.
  118. A Transparent Overlapping Field
  119. "Now 
  120. good men 
  121. come 
  122. their country."
  123. getcurrenttime()
  124. "It took" && getTime(
  125. ) && "
  126. buttonup
  127. buttonup
  128. Now is the time for all good men to come to the aid of their country.
  129. getcurrenttime
  130. It took
  131. getTime
  132. seconds to do this.
  133. An Opaque Field
  134. "Now 
  135. good men 
  136. come 
  137. their country."
  138. getcurrenttime()
  139. "It took" && getTime(
  140. ) && "
  141. buttonup
  142. buttonup
  143. Now is the time for all good men to come to the aid of their country.
  144. getcurrenttime
  145. It took
  146. getTime
  147. seconds to do this.
  148. A Transparent Field
  149. Be Careful How You Place Fieldsdssssss
  150. The speed of typing or of displaying text through OpenScript can vary greatly: :, depending on:
  151. getcurrenttime()
  152. "It only took" && getTime(
  153. ) && "
  154. a list 
  155. 100 things."
  156. buttonup
  157. buttonup
  158. getcurrenttime
  159. It only took
  160. getTime
  161. seconds to pop a list of 100 things.
  162. The Right Way  -->  Pop
  163. getcurrenttime()
  164. "That was" && getTime(
  165. ) && "
  166. iterate through a list 
  167. 100 things."
  168. buttonup
  169. buttonup
  170. getcurrenttime
  171. That was
  172. getTime
  173. seconds to iterate through a list of 100 things.
  174. The Wrong Way  -->  Item
  175. An Obscure Concept:  Pop, Don't Steptep
  176. When referring to  items in a comma-separated list, don't step through items by saying  "item i of foo". Instead just pop a working copy of the list until it's null.
  177. to handle buttonup
  178.     system realList
  179.     local wrkList
  180.     set wrkList to realList
  181.     while wrkList is not null
  182.         pop wrkList
  183.         --do something with IT here
  184.     end
  185. to handle buttonup
  186.     system realList
  187.     step i from 1 to itemcount(realList)
  188.         get item i of realList
  189.         --do something with IT here
  190.     end
  191.     end
  192. Some Common Sense.... Sense...
  193. Use a common background for similar pages
  194. Minimize the number of objects on the page and background
  195. Group objects only when your scripts require it
  196. Clip bitmaps to as small a size as possible
  197. Clean up your books before distributing themed rectangular ones
  198. Avoid overlapping objects such as data fields and their labels
  199. Use a background pattern of none if you're brave
  200. Don't wrap text in fields if you can instead fit it all on one lineve
  201. Don't wrap text in fields if you can instead fit it all on one linerap text in fields if you can instead fit it all on one line
  202. Maybe These Aren't So Obvious...o
  203. Cache property values and object references into variables
  204. "Clear" properties or variables instead of setting them to null
  205. Put keyDown/Up/Char handlers only where they're needed
  206. Limit code in your Idle handler
  207. Use the "character" string specifier over "word" or textline"
  208. Pre-flip pages before showing the main windowowwndown windowwre showing the main window
  209. "cache"
  210. "udp"
  211. terpage
  212. leavepage
  213. enterpage
  214. enterpage
  215. leavepage
  216. cache
  217. "cache"
  218. getcurrenttime()
  219. "It only took" && getTime(
  220. ) && "
  221. refer 
  222. a property value that was cached 
  223. buttonup
  224. buttonup
  225. cache
  226. getcurrenttime
  227. It only took
  228. getTime
  229. seconds to refer to a property value that was cached in a local variable.
  230. Cache A Property
  231. getcurrenttime()
  232. "However 
  233. took" && getTime(
  234. ) && "
  235. refer directly 
  236. a default property 2000 times."
  237. buttonup
  238. buttonup
  239. getcurrenttime
  240. However it took
  241. getTime
  242. seconds to refer directly to a default property 2000 times.
  243. Refer To A Default Property
  244. Referring to Properties vs. Caching Them
  245. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  246. "udp"
  247. getcurrenttime()
  248. "And 
  249. took" && getTime(
  250. ) && "
  251. refer 
  252. a user-defined property 2000 times."
  253. buttonup
  254. buttonup
  255. getcurrenttime
  256. And it took
  257. getTime
  258. seconds to refer to a user-defined property 2000 times.
  259. Refer To A User-Defined Property
  260. cache
  261. to handle buttonup  
  262.     set bar to name of this page
  263.     step i from 1 to 2000
  264.         set foo to bar
  265.     end
  266.   end
  267.     set syscursor to 1
  268. foo to t
  269.     end
  270.     beep 1
  271.     set syscursor to 1
  272. to handle buttonup  
  273.  step i from 1 to 2000
  274.         set foo to name of this page
  275.     end
  276.     set syscursor to 1
  277.  of this page
  278.     end
  279.     beep 1
  280.     set syscursor to 1
  281. et syscursor to 1
  282. to handle buttonup  
  283.     step i from 1 to 2000
  284.         set foo to bar of this page
  285.     end
  286. i from 1 to 2000
  287.         set xoo to foo of this page
  288.     end
  289.    set syscursor to 1
  290. et syscursor to 1
  291. yellow
  292. getcurrenttime()
  293. "It took" && (
  294. )/1000 && "
  295. a message 
  296. here."
  297. buttonup
  298. buttonup
  299. getcurrenttime
  300. It took
  301. getcurrenttime
  302. seconds for a message to get here.
  303. Send Message (Book Handler)
  304. "vs. Caching Them
  305. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  306. "udp"
  307. getcurrenttime()
  308. "And 
  309. took" && getTime(
  310. ) && "
  311. refer 
  312. a user-defined property 2000 times."
  313. buttonup
  314. buttonup
  315. getcurrenttime
  316. And it took
  317. getTime
  318. seconds to refer to a user-defined property 2000 times.
  319. Refer To A User-Defined Property
  320. cache
  321. to handle buttonup  
  322.     set bar to name of this page
  323.     step i from 1 to 2000
  324.         set foo to bar
  325.     end
  326.   end
  327.     set syscursor to 1
  328. foo to t
  329.     end
  330.     beep 1
  331.     set syscursor to 1
  332. to handle buttonup  
  333.  step i from 1 to 2000
  334.         set foo to name of this page
  335.     end
  336.     set syscursor to 1
  337.  of this page
  338.     end
  339.     beep 1
  340.     set syscursor to 1
  341. et syscursor to 1
  342. to handle buttonup  
  343.     step i from 1 to 2000
  344.         set foo to bar of this page
  345.     end
  346. i from 1 to 2000
  347.         set xoo to foo of this page
  348.     end
  349.    set syscursor to 1
  350. et syscursor to 1
  351. yellow
  352. getcurrenttime()
  353. "It took" && (
  354. )/1000 && "
  355. a message 
  356. here."
  357. buttonup
  358. buttonup
  359. getcurrenttime
  360. It took
  361. getcurrenttime
  362. seconds for a message to get here.
  363. Send Message (Book Handler)
  364. "vs. Caching Them
  365. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  366. "udp"
  367. getcurrenttime()
  368. "And 
  369. took" && getTime(
  370. ) && "
  371. refer 
  372. a user-defined property 2000 times."
  373. buttonup
  374. buttonup
  375. getcurrenttime
  376. And it took
  377. getTime
  378. seconds to refer to a user-defined property 2000 times.
  379. Refer To A User-Defined Property
  380. cache
  381. to handle buttonup  
  382.     set bar to name of this page
  383.     step i from 1 to 2000
  384.         set foo to bar
  385.     end
  386.   end
  387.     set syscursor to 1
  388. foo to t
  389.     end
  390.     beep 1
  391.     set syscursor to 1
  392. to handle buttonup  
  393.  step i from 1 to 2000
  394.         set foo to name of this page
  395.     end
  396.     set syscursor to 1
  397.  of this page
  398.     end
  399.     beep 1
  400.     set syscursor to 1
  401. et syscursor to 1
  402. to handle buttonup  
  403.     step i from 1 to 2000
  404.         set foo to bar of this page
  405.     end
  406. i from 1 to 2000
  407.         set xoo to foo of this page
  408.     end
  409.    set syscursor to 1
  410. et syscursor to 1
  411. yellow
  412. getcurrenttime()
  413. "It took" && (
  414. )/1000 && "
  415. a message 
  416. here."
  417. buttonup
  418. buttonup
  419. getcurrenttime
  420. It took
  421. getcurrenttime
  422. seconds for a message to get here.
  423. Send Message (Book Handler)
  424. "vs. Caching Them
  425. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  426. "udp"
  427. getcurrenttime()
  428. "And 
  429. took" && getTime(
  430. ) && "
  431. refer 
  432. a user-defined property 2000 times."
  433. buttonup
  434. buttonup
  435. getcurrenttime
  436. And it took
  437. getTime
  438. seconds to refer to a user-defined property 2000 times.
  439. Refer To A User-Defined Property
  440. cache
  441. to handle buttonup  
  442.     set bar to name of this page
  443.     step i from 1 to 2000
  444.         set foo to bar
  445.     end
  446.   end
  447.     set syscursor to 1
  448. foo to t
  449.     end
  450.     beep 1
  451.     set syscursor to 1
  452. to handle buttonup  
  453.  step i from 1 to 2000
  454.         set foo to name of this page
  455.     end
  456.     set syscursor to 1
  457.  of this page
  458.     end
  459.     beep 1
  460.     set syscursor to 1
  461. et syscursor to 1
  462. to handle buttonup  
  463.     step i from 1 to 2000
  464.         set foo to bar of this page
  465.     end
  466. i from 1 to 2000
  467.         set xoo to foo of this page
  468.     end
  469.    set syscursor to 1
  470. et syscursor to 1
  471. yellow
  472. getcurrenttime()
  473. "It took" && (
  474. )/1000 && "
  475. a message 
  476. here."
  477. buttonup
  478. buttonup
  479. getcurrenttime
  480. It took
  481. getcurrenttime
  482. seconds for a message to get here.
  483. Send Message (Book Handler)
  484. "vs. Caching Them
  485. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  486. "udp"
  487. getcurrenttime()
  488. "And 
  489. took" && getTime(
  490. ) && "
  491. refer 
  492. a user-defined property 2000 times."
  493. buttonup
  494. buttonup
  495. getcurrenttime
  496. And it took
  497. getTime
  498. seconds to refer to a user-defined property 2000 times.
  499. Refer To A User-Defined Property
  500. cache
  501. to handle buttonup  
  502.     set bar to name of this page
  503.     step i from 1 to 2000
  504.         set foo to bar
  505.     end
  506.   end
  507.     set syscursor to 1
  508. foo to t
  509.     end
  510.     beep 1
  511.     set syscursor to 1
  512. to handle buttonup  
  513.  step i from 1 to 2000
  514.         set foo to name of this page
  515.     end
  516.     set syscursor to 1
  517.  of this page
  518.     end
  519.     beep 1
  520.     set syscursor to 1
  521. et syscursor to 1
  522. to handle buttonup  
  523.     step i from 1 to 2000
  524.         set foo to bar of this page
  525.     end
  526. i from 1 to 2000
  527.         set xoo to foo of this page
  528.     end
  529.    set syscursor to 1
  530. et syscursor to 1
  531. yellow
  532. getcurrenttime()
  533. "It took" && (
  534. )/1000 && "
  535. a message 
  536. here."
  537. buttonup
  538. buttonup
  539. getcurrenttime
  540. It took
  541. getcurrenttime
  542. seconds for a message to get here.
  543. Send Message (Book Handler)
  544. "vs. Caching Them
  545. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  546. "udp"
  547. getcurrenttime()
  548. "And 
  549. took" && getTime(
  550. ) && "
  551. refer 
  552. a user-defined property 2000 times."
  553. buttonup
  554. buttonup
  555. getcurrenttime
  556. And it took
  557. getTime
  558. seconds to refer to a user-defined property 2000 times.
  559. Refer To A User-Defined Property
  560. cache
  561. to handle buttonup  
  562.     set bar to name of this page
  563.     step i from 1 to 2000
  564.         set foo to bar
  565.     end
  566.   end
  567.     set syscursor to 1
  568. foo to t
  569.     end
  570.     beep 1
  571.     set syscursor to 1
  572. to handle buttonup  
  573.  step i from 1 to 2000
  574.         set foo to name of this page
  575.     end
  576.     set syscursor to 1
  577.  of this page
  578.     end
  579.     beep 1
  580.     set syscursor to 1
  581. et syscursor to 1
  582. to handle buttonup  
  583.     step i from 1 to 2000
  584.         set foo to bar of this page
  585.     end
  586. i from 1 to 2000
  587.         set xoo to foo of this page
  588.     end
  589.    set syscursor to 1
  590. et syscursor to 1
  591. yellow
  592. getcurrenttime()
  593. "It took" && (
  594. )/1000 && "
  595. a message 
  596. here."
  597. buttonup
  598. buttonup
  599. getcurrenttime
  600. It took
  601. getcurrenttime
  602. seconds for a message to get here.
  603. Send Message (Book Handler)
  604. "vs. Caching Them
  605. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  606. "udp"
  607. getcurrenttime()
  608. "And 
  609. took" && getTime(
  610. ) && "
  611. refer 
  612. a user-defined property 2000 times."
  613. buttonup
  614. buttonup
  615. getcurrenttime
  616. And it took
  617. getTime
  618. seconds to refer to a user-defined property 2000 times.
  619. Refer To A User-Defined Property
  620. cache
  621. to handle buttonup  
  622.     set bar to name of this page
  623.     step i from 1 to 2000
  624.         set foo to bar
  625.     end
  626.   end
  627.     set syscursor to 1
  628. foo to t
  629.     end
  630.     beep 1
  631.     set syscursor to 1
  632. to handle buttonup  
  633.  step i from 1 to 2000
  634.         set foo to name of this page
  635.     end
  636.     set syscursor to 1
  637.  of this page
  638.     end
  639.     beep 1
  640.     set syscursor to 1
  641. et syscursor to 1
  642. to handle buttonup  
  643.     step i from 1 to 2000
  644.         set foo to bar of this page
  645.     end
  646. i from 1 to 2000
  647.         set xoo to foo of this page
  648.     end
  649.    set syscursor to 1
  650. et syscursor to 1
  651. yellow
  652. getcurrenttime()
  653. "It took" && (
  654. )/1000 && "
  655. a message 
  656. here."
  657. buttonup
  658. buttonup
  659. getcurrenttime
  660. It took
  661. getcurrenttime
  662. seconds for a message to get here.
  663. Send Message (Book Handler)
  664. "vs. Caching Them
  665. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  666. "udp"
  667. getcurrenttime()
  668. "And 
  669. took" && getTime(
  670. ) && "
  671. refer 
  672. a user-defined property 2000 times."
  673. buttonup
  674. buttonup
  675. getcurrenttime
  676. And it took
  677. getTime
  678. seconds to refer to a user-defined property 2000 times.
  679. Refer To A User-Defined Property
  680. cache
  681. to handle buttonup  
  682.     set bar to name of this page
  683.     step i from 1 to 2000
  684.         set foo to bar
  685.     end
  686.   end
  687.     set syscursor to 1
  688. foo to t
  689.     end
  690.     beep 1
  691.     set syscursor to 1
  692. to handle buttonup  
  693.  step i from 1 to 2000
  694.         set foo to name of this page
  695.     end
  696.     set syscursor to 1
  697.  of this page
  698.     end
  699.     beep 1
  700.     set syscursor to 1
  701. et syscursor to 1
  702. to handle buttonup  
  703.     step i from 1 to 2000
  704.         set foo to bar of this page
  705.     end
  706. i from 1 to 2000
  707.         set xoo to foo of this page
  708.     end
  709.    set syscursor to 1
  710. et syscursor to 1
  711. yellow
  712. getcurrenttime()
  713. "It took" && (
  714. )/1000 && "
  715. a message 
  716. here."
  717. buttonup
  718. buttonup
  719. getcurrenttime
  720. It took
  721. getcurrenttime
  722. seconds for a message to get here.
  723. Send Message (Book Handler)
  724. "vs. Caching Them
  725. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  726. "udp"
  727. getcurrenttime()
  728. "And 
  729. took" && getTime(
  730. ) && "
  731. refer 
  732. a user-defined property 2000 times."
  733. buttonup
  734. buttonup
  735. getcurrenttime
  736. And it took
  737. getTime
  738. seconds to refer to a user-defined property 2000 times.
  739. Refer To A User-Defined Property
  740. cache
  741. to handle buttonup  
  742.     set bar to name of this page
  743.     step i from 1 to 2000
  744.         set foo to bar
  745.     end
  746.   end
  747.     set syscursor to 1
  748. foo to t
  749.     end
  750.     beep 1
  751.     set syscursor to 1
  752. to handle buttonup  
  753.  step i from 1 to 2000
  754.         set foo to name of this page
  755.     end
  756.     set syscursor to 1
  757.  of this page
  758.     end
  759.     beep 1
  760.     set syscursor to 1
  761. et syscursor to 1
  762. to handle buttonup  
  763.     step i from 1 to 2000
  764.         set foo to bar of this page
  765.     end
  766. i from 1 to 2000
  767.         set xoo to foo of this page
  768.     end
  769.    set syscursor to 1
  770. et syscursor to 1
  771. yellow
  772. getcurrenttime()
  773. "It took" && (
  774. )/1000 && "
  775. a message 
  776. here."
  777. buttonup
  778. buttonup
  779. getcurrenttime
  780. It took
  781. getcurrenttime
  782. seconds for a message to get here.
  783. Send Message (Book Handler)
  784. "vs. Caching Them
  785. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  786. "udp"
  787. getcurrenttime()
  788. "And 
  789. took" && getTime(
  790. ) && "
  791. refer 
  792. a user-defined property 2000 times."
  793. buttonup
  794. buttonup
  795. getcurrenttime
  796. And it took
  797. getTime
  798. seconds to refer to a user-defined property 2000 times.
  799. Refer To A User-Defined Property
  800. cache
  801. to handle buttonup  
  802.     set bar to name of this page
  803.     step i from 1 to 2000
  804.         set foo to bar
  805.     end
  806.   end
  807.     set syscursor to 1
  808. foo to t
  809.     end
  810.     beep 1
  811.     set syscursor to 1
  812. to handle buttonup  
  813.  step i from 1 to 2000
  814.         set foo to name of this page
  815.     end
  816.     set syscursor to 1
  817.  of this page
  818.     end
  819.     beep 1
  820.     set syscursor to 1
  821. et syscursor to 1
  822. to handle buttonup  
  823.     step i from 1 to 2000
  824.         set foo to bar of this page
  825.     end
  826. i from 1 to 2000
  827.         set xoo to foo of this page
  828.     end
  829.    set syscursor to 1
  830. et syscursor to 1
  831. yellow
  832. getcurrenttime()
  833. "It took" && (
  834. )/1000 && "
  835. a message 
  836. here."
  837. buttonup
  838. buttonup
  839. getcurrenttime
  840. It took
  841. getcurrenttime
  842. seconds for a message to get here.
  843. Send Message (Book Handler)
  844. "vs. Caching Them
  845. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  846. "udp"
  847. getcurrenttime()
  848. "And 
  849. took" && getTime(
  850. ) && "
  851. refer 
  852. a user-defined property 2000 times."
  853. buttonup
  854. buttonup
  855. getcurrenttime
  856. And it took
  857. getTime
  858. seconds to refer to a user-defined property 2000 times.
  859. Refer To A User-Defined Property
  860. cache
  861. to handle buttonup  
  862.     set bar to name of this page
  863.     step i from 1 to 2000
  864.         set foo to bar
  865.     end
  866.   end
  867.     set syscursor to 1
  868. foo to t
  869.     end
  870.     beep 1
  871.     set syscursor to 1
  872. to handle buttonup  
  873.  step i from 1 to 2000
  874.         set foo to name of this page
  875.     end
  876.     set syscursor to 1
  877.  of this page
  878.     end
  879.     beep 1
  880.     set syscursor to 1
  881. et syscursor to 1
  882. to handle buttonup  
  883.     step i from 1 to 2000
  884.         set foo to bar of this page
  885.     end
  886. i from 1 to 2000
  887.         set xoo to foo of this page
  888.     end
  889.    set syscursor to 1
  890. et syscursor to 1
  891. yellow
  892. getcurrenttime()
  893. "It took" && (
  894. )/1000 && "
  895. a message 
  896. here."
  897. buttonup
  898. buttonup
  899. getcurrenttime
  900. It took
  901. getcurrenttime
  902. seconds for a message to get here.
  903. Send Message (Book Handler)
  904. "vs. Caching Them
  905. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  906. "udp"
  907. getcurrenttime()
  908. "And 
  909. took" && getTime(
  910. ) && "
  911. refer 
  912. a user-defined property 2000 times."
  913. buttonup
  914. buttonup
  915. getcurrenttime
  916. And it took
  917. getTime
  918. seconds to refer to a user-defined property 2000 times.
  919. Refer To A User-Defined Property
  920. cache
  921. to handle buttonup  
  922.     set bar to name of this page
  923.     step i from 1 to 2000
  924.         set foo to bar
  925.     end
  926.   end
  927.     set syscursor to 1
  928. foo to t
  929.     end
  930.     beep 1
  931.     set syscursor to 1
  932. to handle buttonup  
  933.  step i from 1 to 2000
  934.         set foo to name of this page
  935.     end
  936.     set syscursor to 1
  937.  of this page
  938.     end
  939.     beep 1
  940.     set syscursor to 1
  941. et syscursor to 1
  942. to handle buttonup  
  943.     step i from 1 to 2000
  944.         set foo to bar of this page
  945.     end
  946. i from 1 to 2000
  947.         set xoo to foo of this page
  948.     end
  949.    set syscursor to 1
  950. et syscursor to 1
  951. yellow
  952. getcurrenttime()
  953. "It took" && (
  954. )/1000 && "
  955. a message 
  956. here."
  957. buttonup
  958. buttonup
  959. getcurrenttime
  960. It took
  961. getcurrenttime
  962. seconds for a message to get here.
  963. Send Message (Book Handler)
  964. "vs. Caching Them
  965. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  966. "udp"
  967. getcurrenttime()
  968. "And 
  969. took" && getTime(
  970. ) && "
  971. refer 
  972. a user-defined property 2000 times."
  973. buttonup
  974. buttonup
  975. getcurrenttime
  976. And it took
  977. getTime
  978. seconds to refer to a user-defined property 2000 times.
  979. Refer To A User-Defined Property
  980. cache
  981. to handle buttonup  
  982.     set bar to name of this page
  983.     step i from 1 to 2000
  984.         set foo to bar
  985.     end
  986.   end
  987.     set syscursor to 1
  988. foo to t
  989.     end
  990.     beep 1
  991.     set syscursor to 1
  992. to handle buttonup  
  993.  step i from 1 to 2000
  994.         set foo to name of this page
  995.     end
  996.     set syscursor to 1
  997.  of this page
  998.     end
  999.     beep 1
  1000.     set syscursor to 1
  1001. et syscursor to 1
  1002. to handle buttonup  
  1003.     step i from 1 to 2000
  1004.         set foo to bar of this page
  1005.     end
  1006. i from 1 to 2000
  1007.         set xoo to foo of this page
  1008.     end
  1009.    set syscursor to 1
  1010. et syscursor to 1
  1011. yellow
  1012. getcurrenttime()
  1013. "It took" && (
  1014. )/1000 && "
  1015. a message 
  1016. here."
  1017. buttonup
  1018. buttonup
  1019. getcurrenttime
  1020. It took
  1021. getcurrenttime
  1022. seconds for a message to get here.
  1023. Send Message (Book Handler)
  1024. "vs. Caching Them
  1025. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1026. "udp"
  1027. getcurrenttime()
  1028. "And 
  1029. took" && getTime(
  1030. ) && "
  1031. refer 
  1032. a user-defined property 2000 times."
  1033. buttonup
  1034. buttonup
  1035. getcurrenttime
  1036. And it took
  1037. getTime
  1038. seconds to refer to a user-defined property 2000 times.
  1039. Refer To A User-Defined Property
  1040. cache
  1041. to handle buttonup  
  1042.     set bar to name of this page
  1043.     step i from 1 to 2000
  1044.         set foo to bar
  1045.     end
  1046.   end
  1047.     set syscursor to 1
  1048. foo to t
  1049.     end
  1050.     beep 1
  1051.     set syscursor to 1
  1052. to handle buttonup  
  1053.  step i from 1 to 2000
  1054.         set foo to name of this page
  1055.     end
  1056.     set syscursor to 1
  1057.  of this page
  1058.     end
  1059.     beep 1
  1060.     set syscursor to 1
  1061. et syscursor to 1
  1062. to handle buttonup  
  1063.     step i from 1 to 2000
  1064.         set foo to bar of this page
  1065.     end
  1066. i from 1 to 2000
  1067.         set xoo to foo of this page
  1068.     end
  1069.    set syscursor to 1
  1070. et syscursor to 1
  1071. yellow
  1072. getcurrenttime()
  1073. "It took" && (
  1074. )/1000 && "
  1075. a message 
  1076. here."
  1077. buttonup
  1078. buttonup
  1079. getcurrenttime
  1080. It took
  1081. getcurrenttime
  1082. seconds for a message to get here.
  1083. Send Message (Book Handler)
  1084. "vs. Caching Them
  1085. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1086. "udp"
  1087. getcurrenttime()
  1088. "And 
  1089. took" && getTime(
  1090. ) && "
  1091. refer 
  1092. a user-defined property 2000 times."
  1093. buttonup
  1094. buttonup
  1095. getcurrenttime
  1096. And it took
  1097. getTime
  1098. seconds to refer to a user-defined property 2000 times.
  1099. Refer To A User-Defined Property
  1100. cache
  1101. to handle buttonup  
  1102.     set bar to name of this page
  1103.     step i from 1 to 2000
  1104.         set foo to bar
  1105.     end
  1106.   end
  1107.     set syscursor to 1
  1108. foo to t
  1109.     end
  1110.     beep 1
  1111.     set syscursor to 1
  1112. to handle buttonup  
  1113.  step i from 1 to 2000
  1114.         set foo to name of this page
  1115.     end
  1116.     set syscursor to 1
  1117.  of this page
  1118.     end
  1119.     beep 1
  1120.     set syscursor to 1
  1121. et syscursor to 1
  1122. to handle buttonup  
  1123.     step i from 1 to 2000
  1124.         set foo to bar of this page
  1125.     end
  1126. i from 1 to 2000
  1127.         set xoo to foo of this page
  1128.     end
  1129.    set syscursor to 1
  1130. et syscursor to 1
  1131. yellow
  1132. getcurrenttime()
  1133. "It took" && (
  1134. )/1000 && "
  1135. a message 
  1136. here."
  1137. buttonup
  1138. buttonup
  1139. getcurrenttime
  1140. It took
  1141. getcurrenttime
  1142. seconds for a message to get here.
  1143. Send Message (Book Handler)
  1144. "vs. Caching Them
  1145. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1146. "udp"
  1147. getcurrenttime()
  1148. "And 
  1149. took" && getTime(
  1150. ) && "
  1151. refer 
  1152. a user-defined property 2000 times."
  1153. buttonup
  1154. buttonup
  1155. getcurrenttime
  1156. And it took
  1157. getTime
  1158. seconds to refer to a user-defined property 2000 times.
  1159. Refer To A User-Defined Property
  1160. cache
  1161. to handle buttonup  
  1162.     set bar to name of this page
  1163.     step i from 1 to 2000
  1164.         set foo to bar
  1165.     end
  1166.   end
  1167.     set syscursor to 1
  1168. foo to t
  1169.     end
  1170.     beep 1
  1171.     set syscursor to 1
  1172. to handle buttonup  
  1173.  step i from 1 to 2000
  1174.         set foo to name of this page
  1175.     end
  1176.     set syscursor to 1
  1177.  of this page
  1178.     end
  1179.     beep 1
  1180.     set syscursor to 1
  1181. et syscursor to 1
  1182. to handle buttonup  
  1183.     step i from 1 to 2000
  1184.         set foo to bar of this page
  1185.     end
  1186. i from 1 to 2000
  1187.         set xoo to foo of this page
  1188.     end
  1189.    set syscursor to 1
  1190. et syscursor to 1
  1191. yellow
  1192. getcurrenttime()
  1193. "It took" && (
  1194. )/1000 && "
  1195. a message 
  1196. here."
  1197. buttonup
  1198. buttonup
  1199. getcurrenttime
  1200. It took
  1201. getcurrenttime
  1202. seconds for a message to get here.
  1203. Send Message (Book Handler)
  1204. "vs. Caching Them
  1205. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1206. "udp"
  1207. getcurrenttime()
  1208. "And 
  1209. took" && getTime(
  1210. ) && "
  1211. refer 
  1212. a user-defined property 2000 times."
  1213. buttonup
  1214. buttonup
  1215. getcurrenttime
  1216. And it took
  1217. getTime
  1218. seconds to refer to a user-defined property 2000 times.
  1219. Refer To A User-Defined Property
  1220. cache
  1221. to handle buttonup  
  1222.     set bar to name of this page
  1223.     step i from 1 to 2000
  1224.         set foo to bar
  1225.     end
  1226.   end
  1227.     set syscursor to 1
  1228. foo to t
  1229.     end
  1230.     beep 1
  1231.     set syscursor to 1
  1232. to handle buttonup  
  1233.  step i from 1 to 2000
  1234.         set foo to name of this page
  1235.     end
  1236.     set syscursor to 1
  1237.  of this page
  1238.     end
  1239.     beep 1
  1240.     set syscursor to 1
  1241. et syscursor to 1
  1242. to handle buttonup  
  1243.     step i from 1 to 2000
  1244.         set foo to bar of this page
  1245.     end
  1246. i from 1 to 2000
  1247.         set xoo to foo of this page
  1248.     end
  1249.    set syscursor to 1
  1250. et syscursor to 1
  1251. yellow
  1252. getcurrenttime()
  1253. "It took" && (
  1254. )/1000 && "
  1255. a message 
  1256. here."
  1257. buttonup
  1258. buttonup
  1259. getcurrenttime
  1260. It took
  1261. getcurrenttime
  1262. seconds for a message to get here.
  1263. Send Message (Book Handler)
  1264. "vs. Caching Them
  1265. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1266. "udp"
  1267. getcurrenttime()
  1268. "And 
  1269. took" && getTime(
  1270. ) && "
  1271. refer 
  1272. a user-defined property 2000 times."
  1273. buttonup
  1274. buttonup
  1275. getcurrenttime
  1276. And it took
  1277. getTime
  1278. seconds to refer to a user-defined property 2000 times.
  1279. Refer To A User-Defined Property
  1280. cache
  1281. to handle buttonup  
  1282.     set bar to name of this page
  1283.     step i from 1 to 2000
  1284.         set foo to bar
  1285.     end
  1286.   end
  1287.     set syscursor to 1
  1288. foo to t
  1289.     end
  1290.     beep 1
  1291.     set syscursor to 1
  1292. to handle buttonup  
  1293.  step i from 1 to 2000
  1294.         set foo to name of this page
  1295.     end
  1296.     set syscursor to 1
  1297.  of this page
  1298.     end
  1299.     beep 1
  1300.     set syscursor to 1
  1301. et syscursor to 1
  1302. to handle buttonup  
  1303.     step i from 1 to 2000
  1304.         set foo to bar of this page
  1305.     end
  1306. i from 1 to 2000
  1307.         set xoo to foo of this page
  1308.     end
  1309.    set syscursor to 1
  1310. et syscursor to 1
  1311. yellow
  1312. getcurrenttime()
  1313. "It took" && (
  1314. )/1000 && "
  1315. a message 
  1316. here."
  1317. buttonup
  1318. buttonup
  1319. getcurrenttime
  1320. It took
  1321. getcurrenttime
  1322. seconds for a message to get here.
  1323. Send Message (Book Handler)
  1324. "vs. Caching Them
  1325. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1326. "udp"
  1327. getcurrenttime()
  1328. "And 
  1329. took" && getTime(
  1330. ) && "
  1331. refer 
  1332. a user-defined property 2000 times."
  1333. buttonup
  1334. buttonup
  1335. getcurrenttime
  1336. And it took
  1337. getTime
  1338. seconds to refer to a user-defined property 2000 times.
  1339. Refer To A User-Defined Property
  1340. cache
  1341. to handle buttonup  
  1342.     set bar to name of this page
  1343.     step i from 1 to 2000
  1344.         set foo to bar
  1345.     end
  1346.   end
  1347.     set syscursor to 1
  1348. foo to t
  1349.     end
  1350.     beep 1
  1351.     set syscursor to 1
  1352. to handle buttonup  
  1353.  step i from 1 to 2000
  1354.         set foo to name of this page
  1355.     end
  1356.     set syscursor to 1
  1357.  of this page
  1358.     end
  1359.     beep 1
  1360.     set syscursor to 1
  1361. et syscursor to 1
  1362. to handle buttonup  
  1363.     step i from 1 to 2000
  1364.         set foo to bar of this page
  1365.     end
  1366. i from 1 to 2000
  1367.         set xoo to foo of this page
  1368.     end
  1369.    set syscursor to 1
  1370. et syscursor to 1
  1371. yellow
  1372. getcurrenttime()
  1373. "It took" && (
  1374. )/1000 && "
  1375. a message 
  1376. here."
  1377. buttonup
  1378. buttonup
  1379. getcurrenttime
  1380. It took
  1381. getcurrenttime
  1382. seconds for a message to get here.
  1383. Send Message (Book Handler)
  1384. "vs. Caching Them
  1385. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1386. "udp"
  1387. getcurrenttime()
  1388. "And 
  1389. took" && getTime(
  1390. ) && "
  1391. refer 
  1392. a user-defined property 2000 times."
  1393. buttonup
  1394. buttonup
  1395. getcurrenttime
  1396. And it took
  1397. getTime
  1398. seconds to refer to a user-defined property 2000 times.
  1399. Refer To A User-Defined Property
  1400. cache
  1401. to handle buttonup  
  1402.     set bar to name of this page
  1403.     step i from 1 to 2000
  1404.         set foo to bar
  1405.     end
  1406.   end
  1407.     set syscursor to 1
  1408. foo to t
  1409.     end
  1410.     beep 1
  1411.     set syscursor to 1
  1412. to handle buttonup  
  1413.  step i from 1 to 2000
  1414.         set foo to name of this page
  1415.     end
  1416.     set syscursor to 1
  1417.  of this page
  1418.     end
  1419.     beep 1
  1420.     set syscursor to 1
  1421. et syscursor to 1
  1422. to handle buttonup  
  1423.     step i from 1 to 2000
  1424.         set foo to bar of this page
  1425.     end
  1426. i from 1 to 2000
  1427.         set xoo to foo of this page
  1428.     end
  1429.    set syscursor to 1
  1430. et syscursor to 1
  1431. yellow
  1432. getcurrenttime()
  1433. "It took" && (
  1434. )/1000 && "
  1435. a message 
  1436. here."
  1437. buttonup
  1438. buttonup
  1439. getcurrenttime
  1440. It took
  1441. getcurrenttime
  1442. seconds for a message to get here.
  1443. Send Message (Book Handler)
  1444. "vs. Caching Them
  1445. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1446. "udp"
  1447. getcurrenttime()
  1448. "And 
  1449. took" && getTime(
  1450. ) && "
  1451. refer 
  1452. a user-defined property 2000 times."
  1453. buttonup
  1454. buttonup
  1455. getcurrenttime
  1456. And it took
  1457. getTime
  1458. seconds to refer to a user-defined property 2000 times.
  1459. Refer To A User-Defined Property
  1460. cache
  1461. to handle buttonup  
  1462.     set bar to name of this page
  1463.     step i from 1 to 2000
  1464.         set foo to bar
  1465.     end
  1466.   end
  1467.     set syscursor to 1
  1468. foo to t
  1469.     end
  1470.     beep 1
  1471.     set syscursor to 1
  1472. to handle buttonup  
  1473.  step i from 1 to 2000
  1474.         set foo to name of this page
  1475.     end
  1476.     set syscursor to 1
  1477.  of this page
  1478.     end
  1479.     beep 1
  1480.     set syscursor to 1
  1481. et syscursor to 1
  1482. to handle buttonup  
  1483.     step i from 1 to 2000
  1484.         set foo to bar of this page
  1485.     end
  1486. i from 1 to 2000
  1487.         set xoo to foo of this page
  1488.     end
  1489.    set syscursor to 1
  1490. et syscursor to 1
  1491. yellow
  1492. getcurrenttime()
  1493. "It took" && (
  1494. )/1000 && "
  1495. a message 
  1496. here."
  1497. buttonup
  1498. buttonup
  1499. getcurrenttime
  1500. It took
  1501. getcurrenttime
  1502. seconds for a message to get here.
  1503. Send Message (Book Handler)
  1504. "vs. Caching Them
  1505. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1506. "udp"
  1507. getcurrenttime()
  1508. "And 
  1509. took" && getTime(
  1510. ) && "
  1511. refer 
  1512. a user-defined property 2000 times."
  1513. buttonup
  1514. buttonup
  1515. getcurrenttime
  1516. And it took
  1517. getTime
  1518. seconds to refer to a user-defined property 2000 times.
  1519. Refer To A User-Defined Property
  1520. cache
  1521. to handle buttonup  
  1522.     set bar to name of this page
  1523.     step i from 1 to 2000
  1524.         set foo to bar
  1525.     end
  1526.   end
  1527.     set syscursor to 1
  1528. foo to t
  1529.     end
  1530.     beep 1
  1531.     set syscursor to 1
  1532. to handle buttonup  
  1533.  step i from 1 to 2000
  1534.         set foo to name of this page
  1535.     end
  1536.     set syscursor to 1
  1537.  of this page
  1538.     end
  1539.     beep 1
  1540.     set syscursor to 1
  1541. et syscursor to 1
  1542. to handle buttonup  
  1543.     step i from 1 to 2000
  1544.         set foo to bar of this page
  1545.     end
  1546. i from 1 to 2000
  1547.         set xoo to foo of this page
  1548.     end
  1549.    set syscursor to 1
  1550. et syscursor to 1
  1551. yellow
  1552. getcurrenttime()
  1553. "It took" && (
  1554. )/1000 && "
  1555. a message 
  1556. here."
  1557. buttonup
  1558. buttonup
  1559. getcurrenttime
  1560. It took
  1561. getcurrenttime
  1562. seconds for a message to get here.
  1563. Send Message (Book Handler)
  1564. "vs. Caching Them
  1565. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1566. "udp"
  1567. getcurrenttime()
  1568. "And 
  1569. took" && getTime(
  1570. ) && "
  1571. refer 
  1572. a user-defined property 2000 times."
  1573. buttonup
  1574. buttonup
  1575. getcurrenttime
  1576. And it took
  1577. getTime
  1578. seconds to refer to a user-defined property 2000 times.
  1579. Refer To A User-Defined Property
  1580. cache
  1581. to handle buttonup  
  1582.     set bar to name of this page
  1583.     step i from 1 to 2000
  1584.         set foo to bar
  1585.     end
  1586.   end
  1587.     set syscursor to 1
  1588. foo to t
  1589.     end
  1590.     beep 1
  1591.     set syscursor to 1
  1592. to handle buttonup  
  1593.  step i from 1 to 2000
  1594.         set foo to name of this page
  1595.     end
  1596.     set syscursor to 1
  1597.  of this page
  1598.     end
  1599.     beep 1
  1600.     set syscursor to 1
  1601. et syscursor to 1
  1602. to handle buttonup  
  1603.     step i from 1 to 2000
  1604.         set foo to bar of this page
  1605.     end
  1606. i from 1 to 2000
  1607.         set xoo to foo of this page
  1608.     end
  1609.    set syscursor to 1
  1610. et syscursor to 1
  1611. yellow
  1612. getcurrenttime()
  1613. "It took" && (
  1614. )/1000 && "
  1615. a message 
  1616. here."
  1617. buttonup
  1618. buttonup
  1619. getcurrenttime
  1620. It took
  1621. getcurrenttime
  1622. seconds for a message to get here.
  1623. Send Message (Book Handler)
  1624. "vs. Caching Them
  1625. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1626. "udp"
  1627. getcurrenttime()
  1628. "And 
  1629. took" && getTime(
  1630. ) && "
  1631. refer 
  1632. a user-defined property 2000 times."
  1633. buttonup
  1634. buttonup
  1635. getcurrenttime
  1636. And it took
  1637. getTime
  1638. seconds to refer to a user-defined property 2000 times.
  1639. Refer To A User-Defined Property
  1640. cache
  1641. to handle buttonup  
  1642.     set bar to name of this page
  1643.     step i from 1 to 2000
  1644.         set foo to bar
  1645.     end
  1646.   end
  1647.     set syscursor to 1
  1648. foo to t
  1649.     end
  1650.     beep 1
  1651.     set syscursor to 1
  1652. to handle buttonup  
  1653.  step i from 1 to 2000
  1654.         set foo to name of this page
  1655.     end
  1656.     set syscursor to 1
  1657.  of this page
  1658.     end
  1659.     beep 1
  1660.     set syscursor to 1
  1661. et syscursor to 1
  1662. to handle buttonup  
  1663.     step i from 1 to 2000
  1664.         set foo to bar of this page
  1665.     end
  1666. i from 1 to 2000
  1667.         set xoo to foo of this page
  1668.     end
  1669.    set syscursor to 1
  1670. et syscursor to 1
  1671. yellow
  1672. getcurrenttime()
  1673. "It took" && (
  1674. )/1000 && "
  1675. a message 
  1676. here."
  1677. buttonup
  1678. buttonup
  1679. getcurrenttime
  1680. It took
  1681. getcurrenttime
  1682. seconds for a message to get here.
  1683. Send Message (Book Handler)
  1684. "vs. Caching Them
  1685. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1686. "udp"
  1687. getcurrenttime()
  1688. "And 
  1689. took" && getTime(
  1690. ) && "
  1691. refer 
  1692. a user-defined property 2000 times."
  1693. buttonup
  1694. buttonup
  1695. getcurrenttime
  1696. And it took
  1697. getTime
  1698. seconds to refer to a user-defined property 2000 times.
  1699. Refer To A User-Defined Property
  1700. cache
  1701. to handle buttonup  
  1702.     set bar to name of this page
  1703.     step i from 1 to 2000
  1704.         set foo to bar
  1705.     end
  1706.   end
  1707.     set syscursor to 1
  1708. foo to t
  1709.     end
  1710.     beep 1
  1711.     set syscursor to 1
  1712. to handle buttonup  
  1713.  step i from 1 to 2000
  1714.         set foo to name of this page
  1715.     end
  1716.     set syscursor to 1
  1717.  of this page
  1718.     end
  1719.     beep 1
  1720.     set syscursor to 1
  1721. et syscursor to 1
  1722. to handle buttonup  
  1723.     step i from 1 to 2000
  1724.         set foo to bar of this page
  1725.     end
  1726. i from 1 to 2000
  1727.         set xoo to foo of this page
  1728.     end
  1729.    set syscursor to 1
  1730. et syscursor to 1
  1731. yellow
  1732. getcurrenttime()
  1733. "It took" && (
  1734. )/1000 && "
  1735. a message 
  1736. here."
  1737. buttonup
  1738. buttonup
  1739. getcurrenttime
  1740. It took
  1741. getcurrenttime
  1742. seconds for a message to get here.
  1743. Send Message (Book Handler)
  1744. "vs. Caching Them
  1745. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1746. "udp"
  1747. getcurrenttime()
  1748. "And 
  1749. took" && getTime(
  1750. ) && "
  1751. refer 
  1752. a user-defined property 2000 times."
  1753. buttonup
  1754. buttonup
  1755. getcurrenttime
  1756. And it took
  1757. getTime
  1758. seconds to refer to a user-defined property 2000 times.
  1759. Refer To A User-Defined Property
  1760. cache
  1761. to handle buttonup  
  1762.     set bar to name of this page
  1763.     step i from 1 to 2000
  1764.         set foo to bar
  1765.     end
  1766.   end
  1767.     set syscursor to 1
  1768. foo to t
  1769.     end
  1770.     beep 1
  1771.     set syscursor to 1
  1772. to handle buttonup  
  1773.  step i from 1 to 2000
  1774.         set foo to name of this page
  1775.     end
  1776.     set syscursor to 1
  1777.  of this page
  1778.     end
  1779.     beep 1
  1780.     set syscursor to 1
  1781. et syscursor to 1
  1782. to handle buttonup  
  1783.     step i from 1 to 2000
  1784.         set foo to bar of this page
  1785.     end
  1786. i from 1 to 2000
  1787.         set xoo to foo of this page
  1788.     end
  1789.    set syscursor to 1
  1790. et syscursor to 1
  1791. yellow
  1792. getcurrenttime()
  1793. "It took" && (
  1794. )/1000 && "
  1795. a message 
  1796. here."
  1797. buttonup
  1798. buttonup
  1799. getcurrenttime
  1800. It took
  1801. getcurrenttime
  1802. seconds for a message to get here.
  1803. Send Message (Book Handler)
  1804. "vs. Caching Them
  1805. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1806. "udp"
  1807. getcurrenttime()
  1808. "And 
  1809. took" && getTime(
  1810. ) && "
  1811. refer 
  1812. a user-defined property 2000 times."
  1813. buttonup
  1814. buttonup
  1815. getcurrenttime
  1816. And it took
  1817. getTime
  1818. seconds to refer to a user-defined property 2000 times.
  1819. Refer To A User-Defined Property
  1820. cache
  1821. to handle buttonup  
  1822.     set bar to name of this page
  1823.     step i from 1 to 2000
  1824.         set foo to bar
  1825.     end
  1826.   end
  1827.     set syscursor to 1
  1828. foo to t
  1829.     end
  1830.     beep 1
  1831.     set syscursor to 1
  1832. to handle buttonup  
  1833.  step i from 1 to 2000
  1834.         set foo to name of this page
  1835.     end
  1836.     set syscursor to 1
  1837.  of this page
  1838.     end
  1839.     beep 1
  1840.     set syscursor to 1
  1841. et syscursor to 1
  1842. to handle buttonup  
  1843.     step i from 1 to 2000
  1844.         set foo to bar of this page
  1845.     end
  1846. i from 1 to 2000
  1847.         set xoo to foo of this page
  1848.     end
  1849.    set syscursor to 1
  1850. et syscursor to 1
  1851. yellow
  1852. getcurrenttime()
  1853. "It took" && (
  1854. )/1000 && "
  1855. a message 
  1856. here."
  1857. buttonup
  1858. buttonup
  1859. getcurrenttime
  1860. It took
  1861. getcurrenttime
  1862. seconds for a message to get here.
  1863. Send Message (Book Handler)
  1864. "vs. Caching Them
  1865. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1866. "udp"
  1867. getcurrenttime()
  1868. "And 
  1869. took" && getTime(
  1870. ) && "
  1871. refer 
  1872. a user-defined property 2000 times."
  1873. buttonup
  1874. buttonup
  1875. getcurrenttime
  1876. And it took
  1877. getTime
  1878. seconds to refer to a user-defined property 2000 times.
  1879. Refer To A User-Defined Property
  1880. cache
  1881. to handle buttonup  
  1882.     set bar to name of this page
  1883.     step i from 1 to 2000
  1884.         set foo to bar
  1885.     end
  1886.   end
  1887.     set syscursor to 1
  1888. foo to t
  1889.     end
  1890.     beep 1
  1891.     set syscursor to 1
  1892. to handle buttonup  
  1893.  step i from 1 to 2000
  1894.         set foo to name of this page
  1895.     end
  1896.     set syscursor to 1
  1897.  of this page
  1898.     end
  1899.     beep 1
  1900.     set syscursor to 1
  1901. et syscursor to 1
  1902. to handle buttonup  
  1903.     step i from 1 to 2000
  1904.         set foo to bar of this page
  1905.     end
  1906. i from 1 to 2000
  1907.         set xoo to foo of this page
  1908.     end
  1909.    set syscursor to 1
  1910. et syscursor to 1
  1911. yellow
  1912. getcurrenttime()
  1913. "It took" && (
  1914. )/1000 && "
  1915. a message 
  1916. here."
  1917. buttonup
  1918. buttonup
  1919. getcurrenttime
  1920. It took
  1921. getcurrenttime
  1922. seconds for a message to get here.
  1923. Send Message (Book Handler)
  1924. "vs. Caching Them
  1925. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1926. "udp"
  1927. getcurrenttime()
  1928. "And 
  1929. took" && getTime(
  1930. ) && "
  1931. refer 
  1932. a user-defined property 2000 times."
  1933. buttonup
  1934. buttonup
  1935. getcurrenttime
  1936. And it took
  1937. getTime
  1938. seconds to refer to a user-defined property 2000 times.
  1939. Refer To A User-Defined Property
  1940. cache
  1941. to handle buttonup  
  1942.     set bar to name of this page
  1943.     step i from 1 to 2000
  1944.         set foo to bar
  1945.     end
  1946.   end
  1947.     set syscursor to 1
  1948. foo to t
  1949.     end
  1950.     beep 1
  1951.     set syscursor to 1
  1952. to handle buttonup  
  1953.  step i from 1 to 2000
  1954.         set foo to name of this page
  1955.     end
  1956.     set syscursor to 1
  1957.  of this page
  1958.     end
  1959.     beep 1
  1960.     set syscursor to 1
  1961. et syscursor to 1
  1962. to handle buttonup  
  1963.     step i from 1 to 2000
  1964.         set foo to bar of this page
  1965.     end
  1966. i from 1 to 2000
  1967.         set xoo to foo of this page
  1968.     end
  1969.    set syscursor to 1
  1970. et syscursor to 1
  1971. yellow
  1972. getcurrenttime()
  1973. "It took" && (
  1974. )/1000 && "
  1975. a message 
  1976. here."
  1977. buttonup
  1978. buttonup
  1979. getcurrenttime
  1980. It took
  1981. getcurrenttime
  1982. seconds for a message to get here.
  1983. Send Message (Book Handler)
  1984. "vs. Caching Them
  1985. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  1986. "udp"
  1987. getcurrenttime()
  1988. "And 
  1989. took" && getTime(
  1990. ) && "
  1991. refer 
  1992. a user-defined property 2000 times."
  1993. buttonup
  1994. buttonup
  1995. getcurrenttime
  1996. And it took
  1997. getTime
  1998. seconds to refer to a user-defined property 2000 times.
  1999. Refer To A User-Defined Property
  2000. cache
  2001. to handle buttonup  
  2002.     set bar to name of this page
  2003.     step i from 1 to 2000
  2004.         set foo to bar
  2005.     end
  2006.   end
  2007.     set syscursor to 1
  2008. foo to t
  2009.     end
  2010.     beep 1
  2011.     set syscursor to 1
  2012. to handle buttonup  
  2013.  step i from 1 to 2000
  2014.         set foo to name of this page
  2015.     end
  2016.     set syscursor to 1
  2017.  of this page
  2018.     end
  2019.     beep 1
  2020.     set syscursor to 1
  2021. et syscursor to 1
  2022. to handle buttonup  
  2023.     step i from 1 to 2000
  2024.         set foo to bar of this page
  2025.     end
  2026. i from 1 to 2000
  2027.         set xoo to foo of this page
  2028.     end
  2029.    set syscursor to 1
  2030. et syscursor to 1
  2031. yellow
  2032. getcurrenttime()
  2033. "It took" && (
  2034. )/1000 && "
  2035. a message 
  2036. here."
  2037. buttonup
  2038. buttonup
  2039. getcurrenttime
  2040. It took
  2041. getcurrenttime
  2042. seconds for a message to get here.
  2043. Send Message (Book Handler)
  2044. "vs. Caching Them
  2045. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  2046. "udp"
  2047. getcurrenttime()
  2048. "And 
  2049. took" && getTime(
  2050. ) && "
  2051. refer 
  2052. a user-defined property 2000 times."
  2053. buttonup
  2054. buttonup
  2055. getcurrenttime
  2056. And it took
  2057. getTime
  2058. seconds to refer to a user-defined property 2000 times.
  2059. Refer To A User-Defined Property
  2060. cache
  2061. to handle buttonup  
  2062.     set bar to name of this page
  2063.     step i from 1 to 2000
  2064.         set foo to bar
  2065.     end
  2066.   end
  2067.     set syscursor to 1
  2068. foo to t
  2069.     end
  2070.     beep 1
  2071.     set syscursor to 1
  2072. to handle buttonup  
  2073.  step i from 1 to 2000
  2074.         set foo to name of this page
  2075.     end
  2076.     set syscursor to 1
  2077.  of this page
  2078.     end
  2079.     beep 1
  2080.     set syscursor to 1
  2081. et syscursor to 1
  2082.